<template>
  <view class="sticky-box">
    <in-work-scan
      @change="handleClick"
      :palletCode="palletCode"
      tip="等待检测中..."
      :show-btn="palletCode === ''"
      :scan="scan"
    />
  </view>
</template>

<script>
export default {
  props: {
    palletCode: {
      type: String,
      default: '',
    },
    scan: {
      type: Boolean,
      default: false,
    },
  },
  methods: {
    handleClick(e) {
      this.$emit('change', e)
    },
  },
}
</script>

<style lang="scss" scoped>
.sticky-box {
  background: #fff;
  border-top: 1px solid #f5f5f5;
  padding: 15rpx 20rpx;
  ::v-deep {
    .scan {
      margin: 0;
    }
  }
}
</style>
